﻿using System.ComponentModel;

namespace SUNRPA.CONTROLS.IMPL.domain {
    public enum TriggerTypeEnum { 
        TimeTrigger
    }
    public class Trigger<T>:BaseDomain where T:TriggerEntry{
        public Trigger() { 
            enable = true;
            isWait = true;
        }
        private string AccountId;
        private string TriggerName;
        private Boolean? Enable;
        private Boolean? IsWait;
        private TriggerTypeEnum TriggerType;
        private string TriggerId;
        private string Expression;
        public string expression { 
            get => Expression;
            set { 
                Expression = value;
                NotifyPropertyChanged("expression");
            } 
        }
         public string accountId { 
            get => AccountId;
            set { 
                AccountId = value;
                NotifyPropertyChanged("accountId");
            } 
        }
        public string triggerId { 
            get => TriggerId;
            set { 
                TriggerId = value;
                NotifyPropertyChanged("triggerId");
            } 
        }
        public string triggerName { 
            get => TriggerName;
            set { 
                TriggerName = value;
                NotifyPropertyChanged("triggerName");
            } 
        }
        public T triggerEntry {get;set;}
        public Boolean? enable {
            get => Enable;
            set { 
                Enable = value;
                NotifyPropertyChanged("enable");
            }
        }
        public Boolean? isWait { 
            get => IsWait;
            set{ 
                IsWait = value;
                NotifyPropertyChanged("isWait");
            }
        }
        public ProcessInfo processInfo {get; set;}
        public TriggerTypeEnum triggerType { 
            get => TriggerType; 
            set{ 
                TriggerType = value;
                NotifyPropertyChanged("triggerType");
            }
        }
    }
}
